package com.adddeluser;

import com.databasefunction.AllDBFunction;
import com.opensymphony.xwork2.ActionSupport;

public class SubmitRegisterUser extends ActionSupport{
	private String username,fullname,useraddress,usercontact,useremail,question1,answer1,question2,answer2;
	
	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getFullname() {
		return fullname;
	}

	public void setFullname(String fullname) {
		this.fullname = fullname;
	}

	public String getUseraddress() {
		return useraddress;
	}

	public void setUseraddress(String useraddress) {
		this.useraddress = useraddress;
	}

	public String getUsercontact() {
		return usercontact;
	}

	public void setUsercontact(String usercontact) {
		this.usercontact = usercontact;
	}

	public String getUseremail() {
		return useremail;
	}

	public void setUseremail(String useremail) {
		this.useremail = useremail;
	}

	public String getQuestion1() {
		return question1;
	}

	public void setQuestion1(String question1) {
		this.question1 = question1;
	}

	public String getAnswer1() {
		return answer1;
	}

	public void setAnswer1(String answer1) {
		this.answer1 = answer1;
	}

	public String getQuestion2() {
		return question2;
	}

	public void setQuestion2(String question2) {
		this.question2 = question2;
	}

	public String getAnswer2() {
		return answer2;
	}

	public void setAnswer2(String answer2) {
		this.answer2 = answer2;
	}

	@Override
	public String execute() throws Exception {
		// TODO Auto-generated me.thod stub
		AllDBFunction allDBFunction = new AllDBFunction();
		allDBFunction.insertTableUsers(username,fullname,useraddress,usercontact,useremail,question1,answer1,question2,answer2);
		addActionMessage("User registered successfully");
		return "success";
		
	}
	
}
